home *** CD-ROM | disk | FTP | other *** search
/ SGI O2 Out of Box Experience 2.2 / SGI O2 Out of Box Experience 2.2.iso / cgi-bin / nph-startSysSetup.cgi < prev    next >
Text File  |  1998-05-26  |  4KB  |  88 lines

  1. #!/bin/sh
  2.  
  3. #**************************************************************************
  4. #*                                                                        *
  5. #*            Copyright (c) 1993 Silicon Graphics, Inc.                   *
  6. #*                      All Rights Reserved                               *
  7. #*                                                                        *
  8. #*         THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI             *
  9. #*                                                                        *
  10. #* The copyright notice above does not evidence any actual of intended    *
  11. #* publication of such source code, and is an unpublished work by Silicon *
  12. #* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is *
  13. #* the property of Silicon Graphics, Inc. Any use, duplication or         *
  14. #* disclosure not specifically authorized by Silicon Graphics is strictly *
  15. #* prohibited.                                                            *
  16. #*                                                                        *
  17. #* RESTRICTED RIGHTS LEGEND:                                              *
  18. #*                                                                        *
  19. #* Use, duplication or disclosure by the Government is subject to         *
  20. #* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in   *
  21. #* Technical Data and Computer Software clause at DFARS 52.227-7013,      *
  22. #* and/or in similar or successor clauses in the FAR, DOD or NASA FAR     *
  23. #* Supplement. Unpublished - rights reserved under the Copyright Laws of  *
  24. #* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N.       *
  25. #* Shoreline Blvd., Mountain View, CA 94039-7311                          *
  26. #**************************************************************************
  27.  
  28. server_protocol=$SERVER_PROTOCOL;
  29. server_software=$SERVER_SOFTWARE;
  30.  
  31. /sbin/echo "$server_protocol 200 OK"
  32. /sbin/echo "Server: $server_software"
  33. /sbin/echo "Content-Type: text/html";
  34. /sbin/echo "Expires: 0\n";
  35.  
  36.  
  37. # Print header
  38. /sbin/echo "<html>\n";
  39. /sbin/echo "<body bgcolor=\"#000000\" text=\"#996688\">\n";
  40. /sbin/echo "<PRE>\n";
  41. /sbin/echo "</PRE>\n";
  42. /sbin/echo "<h2>    Starting System Setup...</h2>\n";
  43. /sbin/echo "<P>\n";
  44. /sbin/echo "             <FONT SIZE="3">It may take up to 30 seconds to start this tool.</FONT>\n";
  45. /sbin/echo "<BR>\n";
  46. /sbin/echo "             <FONT SIZE="3">Please be patient.</FONT>\n";
  47. /sbin/echo "</P>\n";
  48. /sbin/echo "</body>\n";
  49. /sbin/echo "</html>\n";
  50.  
  51.  
  52. DISPLAY=:0.0
  53. export DISPLAY
  54.  
  55. #  Because we are starting from CGI, we need to reset the
  56. #    $HOME so that Netscape can find the preferences file and
  57. #    cache directory.
  58.  
  59. HOME=/tmp/.sset; export HOME
  60. TMPDIR=/tmp; export TMPDIR
  61.  
  62. #    This is centered placement for a 1280x1024 display size
  63. locn="+292+163"
  64.  
  65. # By using websupport/browser we don't need to check to see if EZsetup has
  66. # already been started since the browser will cache the hyperlink and
  67. # not ask for another CGI script to be fired up. If this behavior is
  68. # changed or if some fool adds "Expires: 0\n\n" to the end of the HTTP
  69. # header then we will have to do the following grep-if stuff 
  70. #
  71. #      found=`/sbin/ps -ef | /sbin/grep "/usr/lib/websupport/browser -geometry $locn http://localhost/SysSetup/en_" | /sbin/grep -v grep `
  72. #      if [ -n "$found"  ]; then
  73. #          /usr/bin/X11/xconfirm -c -B "OK" -icon progress \
  74. #          -font '-*-helvetica-medium-r-narrow--19-*-*-*-p-83-iso8859-1' \
  75. #          -t "System Setup has already been started..."  > /dev/null
  76. #        exit
  77. #      fi
  78.  
  79. # Since EZsetup no longer has a dependency on the web server, it 
  80. #    can't run as the user "nobody" anymore due to write permission issues.
  81. /sbin/su - EZsetup -c "/var/sysadmdesktop/EZsetup/SysSetup/bin/browser -display :0.0 -geometry 730x746+$locn file://localhost/var/sysadmdesktop/EZsetup/SysSetup/en_US/Base/SysSetup.html 1\>/dev/null 2\>\&1"
  82.  
  83. # turn the area black again.                                  
  84. /sbin/echo "<html>\n";                                        
  85. /sbin/echo "<body bgcolor=\"#000000\">\n";
  86. /sbin/echo "</body>\n";                                       
  87. /sbin/echo "</html>\n";              
  88.